﻿using System.Collections.Generic;

namespace Nereus.xUnit
{
    using Attributes;
   

    [NClass(Code = "ExampleClass", Description = "example class", Name ="举例的类")]
    public class ExampleClass : ExampleInterface
    {

        private INBuilder _nBuilder;
        private INBuilderConfigure _nBuilderConfigure;
        public ExampleClass(INBuilder nBuilder, INBuilderConfigure nBuilderConfigure)
        {
            _nBuilder = nBuilder;
            _nBuilderConfigure = nBuilderConfigure;
     
        }
        
        
        public class ArguNdTest
        {
            [NProperty("参数A")]
            [NonNereus]
            public string ArguyA { get; set; }
          


        }

        public class ResultNdTest
        {
            [NProperty("响应A")]
            [NonNereus]
            public string ResultA { get; set; }

            [NProperty("响应B")]
            [NonNereus]
            public PropertyTest ResultB { get; set; }
        }
        public class PropertyTest
        {

            [NProperty("姓名")]
            [NonNereus]
            public string Name { get; set; }

            [NProperty("手机号")]
            [NonNereus]
            public string Mobilephone { get; set; }

        }


        [NMethod(Code = "NdTest",
            Description = "Nereus测试",
            Enable = true,
            Method = "POST",
            Name = "Nereus单元测试",
            Argument = typeof(ArguNdTest),
            Result = typeof(ResultNdTest),
            Uri = "nereus/nd/test")]
        [NonNereus]
        public IEnumerable<INClassContent> Build()
        {
           return _nBuilder.BuildClassContent(_nBuilderConfigure.AssemblyPathArray);
        }
    }
}
